package com.moleq.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.moleq.base.MoleQBaseDialog;
import com.moleq.mgpos.activities.R;

public class SignatureMessageDialog extends MoleQBaseDialog {

	public static final int ON_CLICK_SIGNATURE_INPUT = 100;
	public static final int ON_CLICK_SIGNATURE_PRINT = 101;
	private Button mBtnAgain, mBtnPrint;

	private Button.OnClickListener mOnClickListener = new Button.OnClickListener() {

		@Override
		public void onClick(View v) {
			switch (v.getId()) {
			case R.id.btnSignatureAgain:
				onReturnValue(ON_CLICK_SIGNATURE_INPUT, "");
				dismiss();
				break;
			case R.id.btnSignaturePrint:
				onReturnValue(ON_CLICK_SIGNATURE_PRINT, "");
				dismiss();
				break;
			}
		}
	};

	public SignatureMessageDialog(Context context) {
		super(context, R.style.dialog, context);
		constructor(context);

	}

	public SignatureMessageDialog(Context context, Object listener) {
		super(context,  listener);
		constructor(context);
	}

	
	private void constructor(Context context) {
		// TODO Auto-generated method stub
		mContext = context;
	}

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		// set UI layout
		this.setContentView(R.layout.dialog_message_signature_ap);
		this.setCancelable(false);

		mBtnAgain = (Button) findViewById(R.id.btnSignatureAgain);
		mBtnAgain.setOnClickListener(mOnClickListener);

		mBtnPrint = (Button) findViewById(R.id.btnSignaturePrint);
		mBtnPrint.setOnClickListener(mOnClickListener);

	}

	public void show() {
		super.show();

		//
	}

}
